﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Data;
using AcctrueWMS.Foundation.Web;
using AcctrueWMS.Foundation.DAL;

namespace AcctrueWMS.Foundation.WebControls
{
    public class AccFileUpload : AccControl
    {

        public AccFileUpload()
        {
        }
        public override string Render()
        {
            // base.Render();
            StringBuilder sb = new StringBuilder();
            #region 生成控件
         sb.Append(@"
             <a href='javascript:void(0)' uploadFileId='" + base.ID + @"' onclick='wmsCommon.uploadFile(this)'>
              相关文档
             </a>");

            sb.Append("<div style='display:none'><input type='text' ");
            sb.Append(GenerateBasicProperty());
            sb.Append("value='" + GetControlValue() + "'></div>");
            #endregion

            return sb.ToString();
        }

        //protected new string GetControlValue()
        //{
        //    if (string.IsNullOrEmpty(base.SelectedValue))
        //    {
        //        base.SelectedValue = Guid.NewGuid().ToString();
        //    }

        //    return base.SelectedValue;
        //}
    }
}

